package project.layer.devices;

import java.util.LinkedList;
import java.util.List;

import project.layer.physical.Crossroad;


public class Trajectory {

	private LinkedList<Crossroad> crossroad;

	public void load(List<Crossroad> result) {
		this.crossroad = new LinkedList<Crossroad>(result);
	}
	
	@SuppressWarnings("unchecked")
	public List<Crossroad> getTrajectory() {
		return (List<Crossroad>) crossroad.clone();
	}

	public String toString() {
		String ret = "";
		if(crossroad == null)
			return ret;
		
		for (Crossroad c: crossroad) {
			ret += c.toString() + " -> ";
		}
		
		return ret;
	}
}
